/*
 * Created on Jun 23, 2004
 */
package org.vectrics.recruiter.user;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.vectrics.batch.VectricsQuartzJob;
import org.vectrics.domain.Domain;
import org.vectrics.hibernate.ApplicationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @author mmoore
 */
public class InvokeJobAgentsQuartzJob extends VectricsQuartzJob {
	private transient final Log log = LogFactory.getLog(this.getClass());

	/**
	 * 
	 */
	public InvokeJobAgentsQuartzJob() {
		super();
	}

	public void doExecute(Domain domain, ApplicationContext jobContext) throws JobExecutionException {
		log.debug("Starting InvokeJobAgentsQuartzJob");
		try {
			JobAgentsBatch invoker = new JobAgentsBatch(domain);
			invoker.run();
		} catch (Exception ex) {
			log.error("Exception invoking job agent", ex);
		}
		
	}
}
